package com.ruoyi.bookSys.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 图书借阅记录对象 book_borrow
 * 
 * @author liugang
 * @date 2025-10-14
 */
public class BookBorrow extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 借阅记录ID（主键） */
    private Long borrowId;

    /** 图书ID（关联book_info表） */
    @Excel(name = "图书ID", readConverterExp = "关=联book_info表")
    private Long bookId;

    /** 读者ID（关联book_reader表） */
    @Excel(name = "读者ID", readConverterExp = "关=联book_reader表")
    private Long readerId;

    /** 借阅单号（唯一，如：BOR-20240520001） */
    @Excel(name = "借阅单号", readConverterExp = "唯=一，如：BOR-20240520001")
    private String borrowNo;

    /** 借出日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "借出日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date borrowDate;

    /** 计划归还日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划归还日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planReturnDate;

    /** 实际归还日期（未归还则为NULL） */
    @Excel(name = "实际归还日期", readConverterExp = "未=归还则为NULL")
    private Date actualReturnDate;

    /** 逾期天数（实际归还日期-计划归还日期，未逾期则为0） */
    @Excel(name = "逾期天数", readConverterExp = "实=际归还日期-计划归还日期，未逾期则为0")
    private Long overdueDays;

    /** 逾期费用（单位：元） */
    @Excel(name = "逾期费用", readConverterExp = "单=位：元")
    private BigDecimal overdueFee;

    /** 费用状态（0=未缴纳，1=已缴纳） */
    @Excel(name = "费用状态", readConverterExp = "0==未缴纳，1=已缴纳")
    private String feeStatus;

    /** 借阅状态（0=已借出，1=已归还，2=逾期未还，3=丢失） */
    @Excel(name = "借阅状态", readConverterExp = "0==已借出，1=已归还，2=逾期未还，3=丢失")
    private String borrowStatus;

    /** 操作人（办理借阅/归还的管理员） */
    @Excel(name = "操作人", readConverterExp = "办=理借阅/归还的管理员")
    private String operator;

    public void setBorrowId(Long borrowId) 
    {
        this.borrowId = borrowId;
    }

    public Long getBorrowId() 
    {
        return borrowId;
    }

    public void setBookId(Long bookId) 
    {
        this.bookId = bookId;
    }

    public Long getBookId() 
    {
        return bookId;
    }

    public void setReaderId(Long readerId) 
    {
        this.readerId = readerId;
    }

    public Long getReaderId() 
    {
        return readerId;
    }

    public void setBorrowNo(String borrowNo) 
    {
        this.borrowNo = borrowNo;
    }

    public String getBorrowNo() 
    {
        return borrowNo;
    }

    public void setBorrowDate(Date borrowDate) 
    {
        this.borrowDate = borrowDate;
    }

    public Date getBorrowDate() 
    {
        return borrowDate;
    }

    public void setPlanReturnDate(Date planReturnDate) 
    {
        this.planReturnDate = planReturnDate;
    }

    public Date getPlanReturnDate() 
    {
        return planReturnDate;
    }

    public void setActualReturnDate(Date actualReturnDate) 
    {
        this.actualReturnDate = actualReturnDate;
    }

    public Date getActualReturnDate() 
    {
        return actualReturnDate;
    }

    public void setOverdueDays(Long overdueDays) 
    {
        this.overdueDays = overdueDays;
    }

    public Long getOverdueDays() 
    {
        return overdueDays;
    }

    public void setOverdueFee(BigDecimal overdueFee) 
    {
        this.overdueFee = overdueFee;
    }

    public BigDecimal getOverdueFee() 
    {
        return overdueFee;
    }

    public void setFeeStatus(String feeStatus) 
    {
        this.feeStatus = feeStatus;
    }

    public String getFeeStatus() 
    {
        return feeStatus;
    }

    public void setBorrowStatus(String borrowStatus) 
    {
        this.borrowStatus = borrowStatus;
    }

    public String getBorrowStatus() 
    {
        return borrowStatus;
    }

    public void setOperator(String operator) 
    {
        this.operator = operator;
    }

    public String getOperator() 
    {
        return operator;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("borrowId", getBorrowId())
            .append("bookId", getBookId())
            .append("readerId", getReaderId())
            .append("borrowNo", getBorrowNo())
            .append("borrowDate", getBorrowDate())
            .append("planReturnDate", getPlanReturnDate())
            .append("actualReturnDate", getActualReturnDate())
            .append("overdueDays", getOverdueDays())
            .append("overdueFee", getOverdueFee())
            .append("feeStatus", getFeeStatus())
            .append("borrowStatus", getBorrowStatus())
            .append("operator", getOperator())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
